package com.props.starter.demo;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

/**
 * Props Management Demo Application
 *
 * @author Props Management Team
 */
@SpringBootApplication
public class PropsManagementDemoApplication {


    public static void main(String[] args) {
        System.out.println("=================================================");
        System.out.println("🚀 Props Management Demo Application Starting...");
        System.out.println("=================================================");

        ConfigurableApplicationContext context = SpringApplication.run(PropsManagementDemoApplication.class, args);

        String webEndpoint = context.getEnvironment().getProperty("props.management.management-path");

        System.out.println("============================================================");
        System.out.println("✅ Props Management Demo Application Started Successfully!");
        System.out.println("============================================================");
        System.out.println("📱 Management Interface: http://localhost:8080" + webEndpoint + "/index.html");
        System.out.println("🔧 Demo API: http://localhost:8080/demo1/config");
        System.out.println("📊 Current Configuration:");
        System.out.println("   - App Name: Props Management Demo");
        System.out.println("   - App Version: 1.0.0");
        System.out.println("   - Database URL: jdbc:mysql://localhost:3306/demo_db");
        System.out.println("   - Cache Enabled: true");
        System.out.println("============================================================");
        System.out.println("💡 Try modifying configuration values in the web interface!");
        System.out.println("============================================================");
    }
} 